	<?php
		include_once("connect.php");
	?>
						<script language="javascript">
												function validasi(form){
												  if (form.cekin.value == ""){
													alert("Anda belum mengisikan tanggal check in.");
													form.cekin.focus();
													return (false);
												  }    
												  if (form.cekin.value.match('/^[0-9]{4}\-(0[1-9]|1[012])\-(0[1-9]|[12][0-9]|3[01])+$/')){
													alert("Format tanggal yyyy-mm-dd");
													form.cekin.focus();
													return (false);
												  }
												  if (form.cekout.value == ""){
													alert("Anda belum mengisikan tanggal check out.");
													form.cekout.focus();
													return (false);
												  }    
												  if (form.cekout.value.match(dateExp)){
													alert("Format tanggal yyyy-mm-dd");
													form.cekout.focus();
													return (false);
												  }
												  }
						</script>
			<h3>Reservation:</h3>
						<form action="reservasi.php" method="post" id="reservation-form" onsubmit="return validasi(this)">
				 			<table>
								<tr>
									<td><label>Check In:</label></td>
								</tr>
								<tr>
									<td><input class="long" type="text" name="cekin" id="cekin"/></td>
								</tr>
								<tr>
									<td><label>Check Out:</label></td>
								</tr>
								<tr>
									<td><input class="long" type="text" name="cekout" id="cekout" /></div></td>
								</tr>
								<tr>
									<td><label>Hotel:</label></td> 
								</tr>
								<tr>
									<td><select name="nm_hotel">
										<?php
										$q = mysql_query("select * from hotel"); 
										while ($row1 = mysql_fetch_array($q)){
										  echo "<option value=$row1[3]>$row1[3]</option>";
										}
										?>
									</select></td>
								</tr>
								<tr>
									<td><label>Jenis:</label></td> 
								</tr>
								<tr>
									<td><select name="nm_jenis">
										<?php
										$q = mysql_query("select * from jenis_kamar"); 
										while ($row1 = mysql_fetch_array($q)){
										  echo "<option value=$row1[2]>$row1[2]</option>";
										}
										?>
									</select></td>
								</tr>
								<tr>
									<td>
									</br><span><span>
									<input type="submit" name="create" id="button" value="check availability"/></span></span>
									</td>
								</tr>
							</table>
						</form>